//
//  IndexViewController.m
//  LYPhotos
//
//  Created by 美鑫科技 on 16/5/5.
//  Copyright © 2016年 MorpLCP. All rights reserved.
//

#import "IndexViewController.h"
#import "BaseViewController.h"
#import "SelectThemeViewController.h"
#import "ThemeManager.h"
#import "CPSelectColorView.h"

@interface IndexViewController ()

@end

@implementation IndexViewController


- (void)viewDidLoad {
    [super viewDidLoad];
     self.title = @"首页";
    UIBarButtonItem *selectTheme = [[UIBarButtonItem alloc] initWithImage:[LYImage getImageFromBundleWithName:@"skin_btn"] style:(UIBarButtonItemStyleDone) target:self action:@selector(toChangeTheme)];
    self.navigationItem.rightBarButtonItem = selectTheme;
}

- (void)touchesBegan:(NSSet<UITouch *> *)touches withEvent:(UIEvent *)event{
    Theme *theme = [Theme new];
    theme.themeBodyColor = [UIColor whiteColor];
    [[ThemeManager shareManager] changeTheme:theme];
}

- (void)toChangeTheme{
    CPSelectColorView *selectColor = [CPSelectColorView new];
    [selectColor show];
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
 #pragma mark - Navigation
 
 // In a storyboard-based application, you will often want to do a little preparation before navigation
 - (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
 // Get the new view controller using [segue destinationViewController].
 // Pass the selected object to the new view controller.
 }
 */

@end
